const mongoose = require("mongoose");
module.exports = {
	login3: async ({ account, password }) => {
		return await mongoose.model("adminModel").find({ account, password });
	},
	addnewadmin3: async (admin) => {
		return await mongoose.model("adminModel").create(admin);
	},
	getadminlist3: async () => {
		return await mongoose.model("adminModel").find();
	},
	changeavtive3: async ({ _id, account, password, active }) => {
		return await mongoose
			.model("adminModel")
			.updateOne({ _id }, { account, password, active });
	},
};
